void rstrct_one_i(double *uc, double *uf, int nc)
//nc is the coarse-grid dimension. The fine-grid solution is input in uf[1..2*nc-1] , the coarse-grid solution is returned in uc[1..nc].

{ int ic,jc;
    //interior points
    for (jc=3,ic=2;ic<nc;ic++,jc+=2){
      uc[ic]=uf[jc];
    }
  //boundary points
  uc[1]=uf[1];
  uc[nc]=uf[2*nc-1];
}
